# Virtual Router Simulator 
#
# Copyright (C) 2009-2010 VRSim Project
# Author: Choonho Son <choonho@kt.com>
# URL: <http://vrsim.googlecode.com>
# For license information, see LICENSE.TXT
#

from PyQt4 import QtGui,  QtCore
from VRSim.Ui.Ui_About import Ui_About
import VRSim.Globals as globals

thanks = [ 
          ["Sung-Pil Kang",  "rain54@kt.com",  "Client design"], 
          ["Moon-Gab Kim",  "kimoong@kt.com",  "Server management"], 
          ["Hong-Sil Kim",  "star21@kt.com",  "Client & Server design"], 
          ["Sang-Han Kim",  "install@kt.com",  "Client design"]
          ]
          
class About(QtGui.QDialog,  Ui_About):
    def __init__(self):
        QtGui.QDialog.__init__(self)
        Ui_About.__init__(self)
        
        self.setupUi(self)
        self.initPage()
        
    def initPage(self):
        ver = globals.STRVER
        self.label_Version.setText(ver)
        
        # Thanks to
        # Header Label
        items = ["Name",  "e-mail",  "Thanks to"]
        self.tableWidget_Thanks.setColumnWidth(0,  100)
        self.tableWidget_Thanks.setColumnWidth(1,  150)
        
        self.tableWidget_Thanks.setHorizontalHeaderLabels(items)
        
        # display reserver order
        count = len(thanks)
        for index in range(count):
            item = thanks[index]
            # item = ['time', type, 'event']
        
            item1 = QtGui.QTableWidgetItem(item[0] )
            item2 = QtGui.QTableWidgetItem(item[1] )
            item3 = QtGui.QTableWidgetItem(item[2] )
            
            self.tableWidget_Thanks.setItem(index, 0,  item1)
            self.tableWidget_Thanks.setItem(index, 1,  item2)
            self.tableWidget_Thanks.setItem(index, 2,  item3)
            
